import request from "@/utils/request"

export async function queryAdvList(params: Advertisement.QueryAdvListParams) {
  return request<Advertisement.Entity[]>('/app/manager/banner/list', {
    data: params,
  })
}

export async function editAdv(params: Partial<Advertisement.Entity>) {
  return request('/app/manager/banner/addOrUp', {
    data: params,
  })
}

export async function getAdvDetail(params: {infoId: number}) {
  return request<Advertisement.Entity>('/app/manager/banner/detail', {
    data: params,
  })
}

export async function delAdv(params: {
  id: number, 
  status: 1 | 2 | 3, // 1:显示，2-隐藏，3-删除
}) {
  return request('/app/manager/banner/upStatus', {
    data: params,
  })
}
